<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
    //利用 new Array 创建新对象
       var a = [23,456.987];
       var arr1 = new Array();
       var arr2 = new Array(23,45,35,98,79);
       var arr3 = new Array(2,4,6,1);
    // 输出数组数据  
       console.log(arr1);
       console.log(arr2);
       console.log(arr3);
    // 检测数据类型
    console.log(typeof(arr1));
    console.log(typeof(arr2)); 
    // 检测数组是否为对象类型 instanceOf
    console.log(a instanceof Array);    
    console.log(arr1 instanceof Array);
    console.log(arr2 instanceof Array); 
    // 检测变量是否为对象类型
    var b = 3;
    console.log(b instanceof Array);    
    // 检测函数是否为对象类型
    function fun2(){
        console.log(1);
    } 
    console.log(fun2 instanceof Array); 
    console.log(fun2 instanceof Function); 



    </script>
</body>
</html>